<?php
/**
 * @author 罗文鸿
 * @date 2024/5/27
 */
include "./exception/BusinessException.php";
include "./enum/ResponseTypeEnum.php";
// 设置全局异常处理程序
set_exception_handler('globalExceptionHandler');

// 全局异常处理程序
function globalExceptionHandler($exception) {
    echo json_encode(['error' => $exception->getMessage()]);
}

